<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>系统管理 - 管理员列表</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 管理员列表 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <?php
      if($this->pvadd){?>
          <li class="btn-group">
            <button type="button" class="btn blue dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true"> <span>操作</span> <i class="icon-angle-down"></i> </button>
            <ul class="dropdown-menu pull-right" role="menu">
              <li><a href="/system/useradd"><i class="icon-plus"></i> 新增管理员</a></li>
            </ul>
          </li>
          <?
      }
      ?>
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 系统管理 <i class="icon-angle-right"></i> </li>
          <li>管理员列表</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN SAMPLE TABLE PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"><i class="page-title"></i>管理员列表</div>
            <div class="tools"> <a href="javascript:;" class="collapse"></a> </div>
          </div>
          <div class="portlet-body">
            <div class="table-responsive">
             <table class="table">
              <thead>
                <tr>
                  <th>AID</th>
                  <th>姓名</th>
                  <th>邮箱</th>
                  <th>状态</th>
                  <th>最后登录</th>
                  <th>权限</th>
                  <th>绑定会员</th>
                  <th>操作</th>
                </tr>
              </thead>
              <?php
                  foreach($this->group as $k=>$g){
                  ?>
              <tbody>
                <tr>
                  <td colspan="8" class="note note-info"><?=$g['name'];?></td>
                </tr>
              </tbody>
              <?php
                if($this->users['data'])
                {
                  ?>
              <tbody>
                <?
                  foreach($this->users['data'] as $s=> $r){
                    if($r['groupid']==$g['groupid']){
                      
                      if($this->online[$r['aid']]){
                      $zaixian='<span class="label label-success" title="最后操作：'.date("Y-n-j H:i:s",$this->online[$r['aid']]).'">在线</span> ';
                      }else{
                      $zaixian='<span class="label label-default">离线</span> ';
                      }
                ?>
                <tr>
                  <td><?=$r['aid'];?></td>
                  <td><?=$zaixian.$r['realname'];?></td>
                  <td><?=$r['email'];?></td>
                  <td><?=$this->c['stat']['normal'][$r['stat']];?></td>
                  <td><?php
                        if($this->signedlog[$r['aid']]) echo date("Y-m-d H:i:s",$this->signedlog[$r['aid']]);
                  else echo '--';
                  ?></td>
                              <td><?php
                        if($r['pv']=="ALL") echo '<span class="green">全部权限</span>';
                  elseif($r['pv']=="" || $r['pv']=="NON") echo '<span class="red">无权限</span>';
                  else echo '<span class="blue">部分权限</span>';
                  ?></td>
                  <td><?=$r['uid'] >0 ? '['.$r['uid'].'] '.$this->users['user'][$r['uid']]['name'].' ' .$this->users['user'][$r['uid']]['mobile'] : '--';?></td>
                  <td><?php
                        if($this->pvedit && $r['groupid']!=88) echo '<a href="useredit?aid='.$r['aid'].'" class="btn btn-xs blue"><i class="icon-edit"></i> 编辑</a>';
                  else echo '--';
                  ?></td>
                </tr>
                <?
                    }
                  }
                  ?>
              </tbody>
              <?
                  }
                }
                ?>
            </table>
            </div>
          </div>
        </div>
        <!-- END SAMPLE TABLE PORTLET--> 
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
    jQuery(document).ready(function() {    
       App.init();
    });
  </script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>